   <#include
"../common/com.html"/> <@layout>
   	
<!-- ace styles -->
<link rel="stylesheet" href="${ctx}/static/assets/css/ace.min.css" />

<script type="text/javascript">
    /**
     * 鏂板
     */
    function saveModel() {
        var id=document.getElementById("id").value;
              if(Validator.Validate(document.getElementById('form1'))){
        } else {
            return;
        }
        
        url = '';
        if(id==""){
            url = '${ctx}/hyglXf/save';
        }     else{
            url = '${ctx}/hyglXf/update';
        }
        $('#form1').form('submit', {
            url : url,
            onSubmit : function() {
                return $(this).form('validate');
            },
            success : function(data) {
                alert(data);
                window.location.href=' ${ctx}/hyglXf';
            }
        });

    }
</script>
<div class="page-content">
<div class="row-fluid">
						<div class="span12">
                <form class="form-horizontal"  id="form1" method="post" >
                	<input type="hidden"  name="id" id="id"    >
								 								<div class="control-group">
									<label class="control-label">卡号:</label>
						<div class="controls"> <input id="card"
								name="card" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">标志:</label>
						<div class="controls"> <input id="xfbz"
								name="xfbz" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">消费名称:</label>
						<div class="controls"> <input id="xfmc"
								name="xfmc" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">消费数量:</label>
						<div class="controls"> <input id="xfsl"
								name="xfsl" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">消费金额:</label>
						<div class="controls"> <input id="xfje"
								name="xfje" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">操作人员名称:</label>
						<div class="controls"> <input id="czymc"
								name="czymc" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">消费提成:</label>
						<div class="controls"> <input id="xftc"
								name="xftc" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">消费折扣:</label>
						<div class="controls"> <input id="xfzk"
								name="xfzk" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">消费实际金额:</label>
						<div class="controls"> <input id="xfsjjg"
								name="xfsjjg" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">录入人代码:</label>
						<div class="controls"> <input id="lrrydm"
								name="lrrydm" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								    								<div class="control-group">
									<label class="control-label">0 未结账:</label>
						<div class="controls"> <input id="yxbz"
								name="yxbz" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								 

    
             </form>
        </div>
        	<div class="span12 center">
				<a  class="btn btn-info btn-small" onclick="saveModel()">纭畾
				<a href="#"  class="btn btn-danger btn-small bigger-110"  onclick="window.location.href=' ${ctx}/hyglXf'"  >鍙栨秷 </a>
		</div>
    </div>
</div>

    </body>
   
    <script>
    	 /**
    * 淇敼椤甸潰浣跨敤
    */
  
 <#list newlist as m>
        document.getElementById("card").value  =  '${(m.card)!}';
        document.getElementById("xfbz").value  =  '${(m.xfbz)!}';
        document.getElementById("xfmc").value  =  '${(m.xfmc)!}';
        document.getElementById("xfsl").value  =  '${(m.xfsl)!}';
        document.getElementById("xfje").value  =  '${(m.xfje)!}';
        document.getElementById("czymc").value  =  '${(m.czymc)!}';
        document.getElementById("xftc").value  =  '${(m.xftc)!}';
        document.getElementById("xfzk").value  =  '${(m.xfzk)!}';
        document.getElementById("xfsjjg").value  =  '${(m.xfsjjg)!}';
        document.getElementById("lrrydm").value  =  '${(m.lrrydm)!}';
        document.getElementById("lrrq").value  =  '${(m.lrrq)!}';
        document.getElementById("yxbz").value  =  '${(m.yxbz)!}';
  
</#list>
    </script>
 </@layout> 
